//
//  AMapHelper.h
//  EasyCar
//
//  Created by nsm on 2017/4/27.
//  Copyright © 2017年 beisheng. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AMapFoundationKit/AMapFoundationKit.h>
#import <AMapLocationKit/AMapLocationKit.h>
#import <AMapSearchKit/AMapSearchKit.h>

#define _amapHelper             [AMapHelper sharedInstance]
#define _amapLocationManager    [AMapHelper sharedInstance].locationManager

@interface AMapHelper : NSObject

@property (nonatomic, strong, readonly) AMapLocationManager *locationManager;
// 选择的城市
@property (nonatomic, strong) CityModel *selectedCity;
// 当前定位城市
@property (nonatomic, strong) CityModel *city;
// 当前用户位置
@property (nonatomic) CLLocationCoordinate2D userCoordinate;
// 城市发生变化
@property (nonatomic, copy) void(^cityDidChanged)(CityModel *city);
// 位置信息发生变化
@property (nonatomic, copy) void(^userlocationDidChanged)(id obj);
// 定位失败
@property (nonatomic, copy) void(^locationDidFailWithError)(NSError *error);

+ (instancetype)sharedInstance;

+ (void)registerApp:(NSString *)apiKey;

@end
